import { Button } from 'antd'
import React, { useEffect, useState } from 'react'
import NewsPublish from '../../components/publish-manage/NewsPublish'
import usePublish from '../../components/publish-manage/uesPublish'

export default function Published() {
  //2 ===已发布
  const {dataSource,handleSunset} = usePublish(2)

  return (
    <div>
      <NewsPublish dataSource={dataSource} button={(id)=><Button danger onClick={()=>handleSunset(id)}>下线</Button>}></NewsPublish>
    </div>
  )
}
